﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

using MahApps.Metro.Controls;
using MahApps.Metro.Controls.Dialogs;
using GalaSoft.MvvmLight.Command;
using MVVMLightDemo.Models;
using System.Collections.ObjectModel;
using GenFu;
using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using System.IO;
using MVVMLightDemo.interfaces;
using System.Reflection;

namespace MVVMLightDemo
{
    /// <summary>
    /// NewWindow.xaml 的交互逻辑
    /// </summary>
    public partial class NewWindow : MetroWindow
    {
        public RelayCommand ShowInfo { get; set; }

        public IServiceContainer _Container;


        public NewWindow(IServiceContainer container)
        {
            InitializeComponent();
            _Container = container;

            ObservableCollection<DownTaskModel> downTasks = new ObservableCollection<DownTaskModel>();
            A.ListOf<DownTaskModel>().ForEach((n) => downTasks.Add(n));
            this.listTask.ItemsSource = downTasks;

            ShowInfo = new RelayCommand(async () =>
            {
                await this.ShowMessageAsync("恭喜你中奖了！", "只需支付500手续费立即了领取20万大奖！", MessageDialogStyle.AffirmativeAndNegative);
            });

        }
    }
}
